<script type="text/javascript" language="javascript">
    <!--
    function onSuccessSurvey(oMessage)
    {
        var countArray = oMessage.split(";");
        var patrn=/^[0-9]*$/;
        if (!patrn.exec(countArray[0]))
            alert(oMessage);
        else
        {
            //$("#spanSurveyResult").css("display","block");
            //$("#spanSurvey").css("display","none");
            alert("支持：" + countArray[0] + " ;   不支持：" + countArray[1]); 
            //var spanHtml = "支持：" + countArray[0] + " ;   不支持：" + countArray[1] + "&nbsp;<a href='javascript:onBack()'>返回</a>";
            //$("#spanSurveyResult").html(spanHtml);
        }
    }

    function onErrorSurvey(x, e)
    {
        alert(x.responseText);
        //$("#btnQuestion").attr("disabled",false);
    }

    function onBack()
    {
        $("#spanSurveyResult").css("display","none");
        $("#spanSurvey").css("display","block");
    }

    function onSurveyClick(flag)
    {
        var id = <?php echo $row_array["id"]; ?>;
        var random = Math.random();
        if(flag != null)
            $.ajax({url:"<?php echo url_for("other/jQuery");?>",data:"random=" + random +"&submitflag=survey&id=" + id +"&surveyFlag=" + flag ,success: onSuccessSurvey,error:onErrorSurvey});
        else
            $.ajax({url:"<?php echo url_for("other/jQuery");?>",data:"random=" + random +"&submitflag=survey&id=" + id ,success: onSuccessSurvey,error:onErrorSurvey});
    }
    //-->
</script>
         <div class="surver">
           <h2><div class="com_tit">在线调查<span>SURVEY</span></div></h2>
           <div class="surver_box">
             <h3><?php echo $row_array["question"]?></h3>
             <span id="spanSurvey"><a href='javascript:onSurveyClick("yes")'>支持</a><a href='javascript:onSurveyClick("no")'>不支持</a><a href="javascript:onSurveyClick(null)">查看</a></span>
             <span id="spanSurveyResult" style="display:none;"></span>
           </div>
         </div>